﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.ServiceProcess;


namespace DonwloadBingImage
{
    [RunInstaller(true)]
    public partial class Installer : System.Configuration.Install.Installer
    {
        private ServiceInstaller miServiceInstaller;
        private ServiceProcessInstaller miServiceProcessInstaller;

        public Installer()
        {
            InitializeComponent();
            
            miServiceProcessInstaller = new ServiceProcessInstaller();
            miServiceInstaller = new ServiceInstaller();
            miServiceProcessInstaller.Account = ServiceAccount.LocalSystem;
            miServiceInstaller.StartType = ServiceStartMode.Automatic;
            miServiceInstaller.Description = "Servicio windows que descarga la imagen de Bing y la pone de salvapantallas";
            miServiceInstaller.ServiceName = "Bing Download Daily Wallpaper";
            Installers.Add(miServiceInstaller);
            Installers.Add(miServiceProcessInstaller);
        }
    }
}
